*** Set $root and preliminaries
return clear
do "${hugo_repkit_root}/code/set_environment.do"
cd "${root}"

* Create output folders if they do not exist
cap mkdir "output"
cap mkdir "output/tables"
cap mkdir "output/figures"
cap mkdir "output/logs"

clear matrix
clear mata
set maxvar 100000

********************************************************************************
*** Analyze

***summary statistics
	do "code/analyze/main/premium distributions.do" // F1
	do "code/analyze/main/sumstats.do" // T1

***ITT regressions
	do "code/analyze/main/ITT daily regression and barchart.do" // F2, T2
	do "code/analyze/main/ITT dayrate regression and plots.do" // F3
	do "code/analyze/main/ITT over time.do" // F5

***usage statistics 
	do "code/analyze/main/demand elasticities.do" // T3, AT6
	do "code/analyze/main/bundle choice.do" // F4
	
***appendix figures
	do "code/analyze/appendix/Hourly viz.do" // AF4
*	do "code/analyze/appendix/Payment and use day distributions.do" // AF5
*	do "code/analyze/appendix/ITT Renewals.do" // AF6
	
***appendix tables
	do "code/analyze/appendix/appendix_sumstats.do" // AT3, AT4 (commented out)
	do "code/analyze/appendix/appendix_ITT_specs.do" // AF3, AT5, AT7, AT9, AT10 (commented out)
	do "code/analyze/appendix/cost of credit.do" // AT2, AT8
	
***in-text values
	do "code/analyze/In text values.do"
